package 笔试.远景;

import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int cnt2=0;
        int cnt5=0;
        for (int i = 1; i <=num ; i++)
        {
            cnt2+= Helper(i,2);
            cnt5+= Helper(i,5);
        }
        System.out.println(cnt2>cnt5?cnt5:cnt2);
    }
    public static int Helper(int num, int n)
    {
        int p=0;
        for (int i = 0; i < num; i++)
        {
            if (num%n==0)
            {
                num/=n;
                p++;
            }
            else
                break;
        }
        return p;
    }
}
